Nagios nie chce wywoływać zdalnych poleceń przez nrpe:
define service{
use generic-service
host_name komputer
service_description Free Space /dev/sda1
check_command check_nrpe!check_sda1
}
przez stronę pojawia się tylko komunikat
(No output returned from plugin)
a z wiersza poleceń działa bez zarzutu:
root@nagios:/etc/nagios3/objects# /usr/lib/nagios/plugins/./check_nrpe -H 11.22.33.44 -c check_sda1 DISK OK - free space: /home 367657 MB (47% inode=97%);| /home=405790MB;651889;733375;0;814862
Problem jest w konfigu check_nrpe.cfg
vim /etc/nagios-plugins/config/check_nrpe.cfg
było
# this command runs a program $ARG1$ with arguments $ARG2$
define command {
command_name check_nrpe
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
# this command runs a program $ARG1$ with no arguments
define command {
command_name check_nrpe_1arg
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
ma być
# this command runs a program $ARG1$ with arguments $ARG2$
define command {
command_name check_nrpe
command_line /usr/lib/nagios/plugins/check_nrpe -H '$HOSTADDRESS$' -c '$ARG1$' -a '$ARG2$'
}
# this command runs a program $ARG1$ with no arguments
define command {
command_name check_nrpe_1arg
command_line /usr/lib/nagios/plugins/check_nrpe -H '$HOSTADDRESS$' -c '$ARG1$'
}
Wystarczyło wszędzie dodać apostrofy (') i restart usług
service nagios-nrpe-server restart service nagios3 restart